<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/index.css">
</block>

    <block name="main">
        <div class="header">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <foreach name="wx_banner_index" item="v">
                        <div class="swiper-slide">
                            <a href="{$v.url}">
                                <img src="{$v.content}" alt="">
                            </a>
                        </div>
                    </foreach>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>

        <div class="block-cp">
            <div class="block-header">
                <h3>精选频道</h3>
            </div>
            <div class="block-body clearfix">
                <div class="block-item">
                    <a href="/Home/Video/appraisal">
                        <div class="item-header">
                            <h4>平台评测</h4>
                            <div class="avatar">
                                <div class="icon-index-ceping"></div>
                            </div>
                        </div>
                        <div class="item-body">
                            <p class="desc">投资平台怕踩雷？为您提供专业的测评报告。</p>
                        </div>
                    </a>
                </div>
                <div class="block-item">
                    <a href="javascript:" onclick="conduct()">
                        <div class="item-header">
                            <h4>理财投顾</h4>
                            <div class="avatar">
                                <div class="icon-index-pusher"></div>
                            </div>
                        </div>
                        <div class="item-body">
                            <p class="desc">成为理财投顾，用理财知识创造财富。</p>
                        </div>
                    </a>
                </div>
            </div>
        </div>

        <div class="block-tj">
            <div class="block-header">
                <h3>热门推荐</h3>
                <div class="arrow-wrapper">
                    <span class="arrow-right"></span>
                </div>
                <a class="view-more" href="/Home/Financial/financial/val/1">更多</a>
            </div>
            <ul class="tj-wrapper">
                <!--注意，不同平台有不同的返利模式-->
                <foreach name="platform" item="v">
                    <li class="tj-item">
                        <a href="/Home/Platform/platform_detail/plat_id/{$v.id}">
                            <div class="tj-item-left">
                                <div class="plat-logo-wrapper">
                                    <img src="{$v.pic}" alt="">
                                </div>
                                <if condition="$v.team_type eq 'CPA+CPS'">
                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <i class="icon-currency"></i>
                                            <span>首投返利</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>最高返现{$v.user_award}元</p>
                                    </div>
                                <elseif condition="$v.team_type eq 'CPA' and $v.id neq 12"/>
                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <i class="icon-currency"></i>
                                            <span>首投返利</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>最高返现{$v.user_award}元</p>
                                    </div>
                                <elseif condition="$v.id eq 12"/>
                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <span>首投返投资金额×{$v.user_roi}%</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>投资{$v.start_amount}返{$v.sch_user_roi}</p>
                                    </div>
                                <elseif condition="$v.team_type eq 'ROI'"/>

                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <span>返投资金额×{$v.user_roi}%</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>投资{$v.start_amount}返{$v.sch_user_roi}</p>
                                    </div>

                                </if>

                            </div>
                            <div class="tj-item-right">
                                <div class="plat-info-header">
                                    <h3 class="plat-name">{$v.name}</h3>
                                    <div class="plat-plan">{$v.plat_sch_count}个投资方案</div>
                                    <div class="tag-wrapper">
                                        <notempty name='v.background'><span class="tag">{$v.background}</span></notempty>
                                        <if condition="$v.deposit neq '暂无' ">
                                        <span class="tag">{$v.deposit}</span>
                                        </if>
                                    </div>
                                </div>
                                <ul class="plat-info-body">
                                    <li>
                                        <div class="left">投资期限</div>
                                        <div class="right">{$v.deadline}</div>
                                    </li>
                                    <li>
                                        <div class="left">起投金额</div>
                                        <div class="right">{$v.start_amount}元</div>
                                    </li>
                                    <li>
                                        <div class="left">往期年化</div>
                                        <div class="right dc3838">{$v.yields}</div>
                                    </li>
                                </ul>
                            </div>
                        </a>
                        <!--如果是一键投，显示下面的sign1-->
                        <if condition="$v.is_port eq 1">
                        <div class="plat-sign1"></div>
                        <else/>
                        <!--如果是跳转投，显示下面的sign2-->
                        <div class="plat-sign2"></div>
                        </if>
                    </li>
                </foreach>
            </ul>
        </div>


        <!--首页广告-->
        <div class="ad-wrapper">
            <div class="ad-swiper-container">
                <div class="swiper-wrapper">
                    <foreach name="wx_middle_index" item="v">
                        <div class="swiper-slide">
                            <a href="{$v.url}">
                                <img src="{$v.content}" alt="">
                            </a>
                        </div>
                    </foreach>
                </div>
            </div>
        </div>

        <div class="block-jx">
            <div class="block-header">
                <h3>精选平台</h3>
                <div class="arrow-wrapper">
                    <span class="arrow-right"></span>
                </div>
                <a class="view-more" href="/Home/Financial/financial/val/2">更多</a>
            </div>
            <ul class="tj-wrapper">
                <!--注意，不同平台有不同的返利模式-->
                <foreach name="platform_jx" item="v">
                    <li class="tj-item">
                        <a href="/Home/Platform/platform_detail/plat_id/{$v.id}">
                            <div class="tj-item-left">
                                <div class="plat-logo-wrapper">
                                    <img src="{$v.pic}" alt="">
                                </div>
                                <if condition="$v.team_type eq 'CPA+CPS'">
                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <i class="icon-currency"></i>
                                            <span>首投返利</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>最高返现{$v.user_award}元</p>
                                    </div>
                                    <elseif condition="$v.team_type eq 'CPA' and $v.id neq 12"/>
                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <i class="icon-currency"></i>
                                            <span>首投返利</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>最高返现{$v.user_award}元</p>
                                    </div>
                                    <elseif condition="$v.id eq 12"/>
                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <span>首投返投资金额×{$v.user_roi}%</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>投资{$v.sch_start_amount}返{$v.sch_user_roi}</p>
                                    </div>
                                    <elseif condition="$v.team_type eq 'ROI'"/>

                                    <div class="plat-tag-wrapper">
                                        <div class="plat-tag">
                                            <span>返投资金额×{$v.user_roi}%</span>
                                        </div>
                                    </div>
                                    <div class="tag-msg">
                                        <p>投资{$v.sch_start_amount}返{$v.sch_user_roi}</p>
                                    </div>

                                </if>

                            </div>
                            <div class="tj-item-right">
                                <div class="plat-info-header">
                                    <h3 class="plat-name">{$v.name}</h3>
                                    <div class="plat-plan">{$v.plat_sch_count}个投资方案</div>
                                    <div class="tag-wrapper">
                                        <notempty name='v.background'><span class="tag">{$v.background}</span></notempty>
                                         <if condition="$v.deposit neq '暂无' ">
                                        <span class="tag">{$v.deposit}</span>
                                        </if>
                                    </div>
                                </div>
                                <ul class="plat-info-body">
                                    <li>
                                        <div class="left">投资期限</div>
                                        <div class="right">{$v.deadline}</div>
                                    </li>
                                    <li>
                                        <div class="left">起投金额</div>
                                        <div class="right">{$v.start_amount}元</div>
                                    </li>
                                    <li>
                                        <div class="left">往期年化</div>
                                        <div class="right dc3838">{$v.yields}</div>
                                    </li>
                                </ul>
                            </div>
                        </a>
                         <if condition="$v.is_port eq 1">
                        <!--如果是一键投，显示下面的sign1-->
                        <div class="plat-sign1"></div>
                        <else/>
                        <!--如果是跳转投，显示下面的sign2-->
                        <div class="plat-sign2"></div>
                        </if>
                    </li>
                </foreach>
            </ul>
        </div>

</block>
<script src="__PUBLIC__js/index.js"></script>
<block name="js">
    <script>
        var user_id = "{$_SESSION['user']['id']}";
        function conduct() {
            if(user_id) {
                $.post("{:U('Index/check_push')}",{user_id:user_id},function(res) {
                    if(res.err==0) {
                        location.href="/Home/Person/push_index";
                    } else {
                        location.href="/Home/Recommend/apply_pusher";
                    }
                });
            } else {
                layer.open({
                    content:"请先登录"
                    ,skin: 'msg'
                    ,time: 1
                    ,end: function() {
                        location.href="/Home/User/login?callback=/Home/Index/index";
                    }
                });
            }
        }

   // function /Home/Recommend/apply_pusher


    </script>
</block>
